package org.anyin.gitee.cloud.center.base.enums;

import lombok.Getter;
import org.anyin.gitee.cloud.lib.core.exceptions.CommonException;

@Getter
public enum BaseExCodeEnum {
    SYS_ROUTE_PATH_EXIST("BASE00001", "Path已经存在"),
    SYS_ROUTE_ROUTE_NAME("BASE00002", "RouteName已经存在"),
    ;

    private String code;

    private String message;

    BaseExCodeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public CommonException getException(){
        return new CommonException(this.code, this.message);
    }
}
